<%-- 
    Document   : billCanceledTour
    Created on : Nov 2, 2011, 12:16:46 AM
    Author     : Mr-aUgust
--%>

<%@page pageEncoding="UTF-8"%>
<%@ page session="true" import="java.util.Collection, DAL.*" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<%
String username="";
String typeTour="";
String numberOfChild="";
String numberOfAdult="";
String totalOfGuest="";
String totalTMoney="";
String startDate="";
String endDate="";
String dateBooking="";
String cash="";
String dateCancel="";
String refundMoney="";

if(session.getAttribute("User")!=null) {
    String tourId=session.getAttribute("tourId").toString();
    username=session.getAttribute("User").toString();
    
    typeTour=session.getAttribute("typeTour").toString();
    numberOfChild=session.getAttribute("numberOfChild").toString();
    numberOfAdult=session.getAttribute("numberOfAdult").toString();
    totalOfGuest=session.getAttribute("totalOfGuest").toString();
    totalTMoney=session.getAttribute("totalTMoney").toString();
    startDate=session.getAttribute("startDate").toString();
    endDate=session.getAttribute("endDate").toString();
    dateBooking=session.getAttribute("dateBooking").toString();
    cash=session.getAttribute("cash").toString();
    dateCancel=session.getAttribute("dateCancel").toString();
    refundMoney=session.getAttribute("refundMoney").toString();
    
    TourPackageBean tc=new TourPackageBean();
    Collection coll=tc.getPricetourPackage(tourId);
    request.setAttribute("viewBillCan",coll);
} else {
    out.println("<script>alert('Please login before view bills of the tour !');window.location='index.jsp';</script>");
    
}
%>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>East2West Tours and Travels</title>
        <script type="text/javascript">
            function printPage()
            {
            window.print();
            }
        </script>
    </head>
    <body>
        <center>     
            <table style="border:1px solid #ccc;">
                <tr>
                    <td colspan="2" style="background:url(skinImgTuor/backTitGreenL.png) repeat-y;clear:both;width:600px;" height="20px"></td>
                </tr>
                <tr><td colspan="2" align="center" style="color:#0000CC;font-size:24px"><b>Details of Booking Tour</b></td></tr>
                <tr>
                    <td colspan="2" align="left"><h3>Information of the tour: </h3></td>
                </tr>
                <tr>
                    <td align="left">Tour name:</td>
                    <td align="left" style="font-size:12px;font-family:Arial, Helvetica, sans-serif;"><b><%=typeTour%><b/></td>
                </tr>
                <c:forEach items="${viewBillCan}" var="tpc">
                    <tr>
                        <td align="left">Price Adult:</td>
                        <td align="left"><b>${tpc.adultPrice} USD/1 person</b></td>
                    </tr>
                    <tr>
                        <td align="left">Price Child:</td>
                        <td align="left"><b>${tpc.childPrice} USD/1 person</b></td>
                    </tr>
                </c:forEach>
                <tr>
                    <td colspan="2"><h3>Details of the registration: </h3></td>
                </tr>
                <tr>
                    <td align="left">User name:</td>
                    <td align="left"><%=username%></td>
                </tr>
                <tr>
                    <td align="left">Start date of traveling:</td>
                    <td align="left"><%=startDate%></td>
                </tr>
                <tr>
                    <td align="left">End date of traveling :</td>
                    <td align="left"><%=endDate%></td>
                </tr>
                <tr>
                    <td align="left">Date booking :</td>
                    <td align="left"><%=dateBooking%></td>
                </tr>
                <tr>
                    <td align="left">Number of children traveling:</td>
                    <td align="left"><%=numberOfChild%> person</td>
                </tr>
                <tr>
                    <td align="left">Number of adults traveling:</td>
                    <td align="left"><%=numberOfAdult%> person</td>
                </tr>
                <tr>
                    <td align="left">Total of guests :</td>
                    <td align="left"><%=totalOfGuest%> person</td>
                </tr>        
                <tr>
                    <td align="left">Sum money :</td>
                    <td align="left"><%=totalTMoney%> USD</td>
                </tr>
                <tr>
                    <td align="left">Method payment:</td>
                    <td align="left"><%=cash%></td>
                </tr>
                <tr>
                    <td colspan="2" align="left"><h3>Information of canceling the tour:</h3></td>           
                </tr>
                <tr>
                    <td align="left">Date canceled</td>        
                    <td align="left"><%=dateCancel%></td>            
                </tr>
                <tr>
                    <td align="left">Refund money:</td>        
                    <td align="left"><%=refundMoney%> USD</td>            
                </tr>
                <tr>                    
                    <td colspan="2">
                        <input type="submit" value="Print version" name="print" onClick="printPage()" style="background-image:url(skinImgTuor/btnSmall.jpg);color: #fff;font-weight:bold;"/>
                    </td>            
                </tr>
                <tr>
                    <td></td>
                    <td></td>
                </tr>
                <tr>
                    <td align="left" style="color: #CC3333;"><b>Note :<b/></td>        
                    <td align="left" style="color: #CC3333;">
                        <p><i>
                                The refund rules are given as below:
                                <br>
                                Before 1 day – 75%
                                <br>
                                2 days – 80%
                                <br>
                                3 days – 85%
                                <br>
                                4 days – 90%
                                <br>
                                5 days or more – 95%
                            </i>
                    </p></td>            
                </tr>
            </table>
            
        </center>  
        
    </body>
</html>
